import React from 'react';
import { Routes, Route } from 'react-router-dom';
// import LoadingScreen from './pages/LoadingScreen';

import Login from './pages/home/Login.jsx';
import MainLayout from './layouts/MainLayout.jsx';
import WMS from './pages/home/AppCenter.jsx';
import SettingPage from './pages/home/SettingPage.jsx';
import HomePage from './pages/home/HomePage.jsx';
// import AntCalendarCalendar from './components/Calendar.jsx';
import NotFound from './components/404Page.jsx';
import ExpenseTemplates from './pages/finance/ExpenseTemplates.jsx';
import SimplePrintPage from './pages/PrintCenter.jsx';
import PersonalManage from "./pages/Information/PersonalManage.jsx";
import RoleManagement  from "./pages/Information/RoleManagement.jsx";
import UserManage  from "./pages/Information/UserManage.jsx";
import ApprovalProcessManagement from "./pages/Information/ApprovalProcessManagement.jsx";
import SupplierManagement from "./pages/Information/SupplierManagement.jsx";
import ProjectOverview from './pages/project/ProjectOverview.jsx';
import FeeApproval from "./pages/approval/FeeApproval.jsx";
import TreeMenu from "./pages/Information/TreeMenu.jsx";
import InboundManagement from "./pages/warehouse/InboundManagement.jsx";
import OutboundManagement from "./pages/warehouse/OutboundManagement.jsx";
import ProcureOverview from "./pages/purchase/PurchaseOverview.jsx";
import WarehouseOverview from "./pages/warehouse/WarehouseOverview.jsx";
import ProjectManagement from "./pages/project/ProjectManagement.jsx";
import FinanceOverview from "./pages/finance/FinanceOverview.jsx";
import NotificationCenter from "./pages/Information/NotificationCenter.jsx";
import PurchaseListPage from "./pages/purchase/PurchaseListPage.jsx";
import ApprovalEdit from "./pages/approval/ApprovalEdit.jsx";
import MainSteps from "./pages/home/MainSteps.jsx";
import MaterialsList from "./pages/project/MaterialsList.jsx";

function App() {
    return (
        <Routes>
            {/*  正常页面 */}
            <Route path="/login" element={<Login />} />

            {/*  嵌套路由结构 */}
            <Route path="/" element={<MainLayout />}>
                {/*home*/}
                <Route index element={<WMS />} />
                <Route path="WMS" element={<WMS />} />
                <Route path="setting" element={<SettingPage />} />
                <Route path="homepage" element={<HomePage />} />
                <Route path="test" element={<MainSteps />} />
                <Route path="notification-center" element={<NotificationCenter />} />
                {/*信息管理*/}
                <Route path="personal" element={<PersonalManage />} />
                <Route path="role" element={<RoleManagement />} />
                <Route path="user" element={<UserManage />} />
                <Route path="approval" element={<ApprovalProcessManagement />} />
                <Route path="supplier" element={<SupplierManagement />} />
                <Route path="tree-menu" element={<TreeMenu />} />
                {/*财务*/}
                <Route path="finance" element={<FinanceOverview />} />
                <Route path="expense-templates" element={<ExpenseTemplates />} />
                <Route path="fee-approval" element={<FeeApproval />} />
                {/*采购*/}
                <Route path="purchase" element={<ProcureOverview />} />
                <Route path="purchase-list" element={<PurchaseListPage />} />
                {/*出入库*/}
                <Route path="warehouse" element={<WarehouseOverview />} />
                <Route path="inbound-management" element={<InboundManagement />} />
                <Route path="outbound-management" element={<OutboundManagement />} />
                {/*项目*/}
                <Route path="project" element={<ProjectOverview />} />
                <Route path="project-management" element={<ProjectManagement />} />
                <Route path="materials-list" element={<MaterialsList />} />
                {/*审批*/}
                <Route path="approval-edit" element={<ApprovalEdit />} />

                <Route path="print" element={<SimplePrintPage />} />
            </Route>

            {/* 404 页面 */}
            <Route path="*" element={<NotFound />} />
        </Routes>
    );
}

export default App;
